package com.lgx.mobile.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.lgx.common.entity.IdGenerator;

/**
 * @author xuyichen
 * 
 * 礼品赠送记录
 *
 */
@Entity
@Table(name = "TM_M_GIFT_RECORD")
public class GiftRecord implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator=IdGenerator.TM_M_GIFT_RECORD_ID)
	@TableGenerator(
			name = IdGenerator.TM_M_GIFT_RECORD_ID,
			table = IdGenerator.GENERATOR_TABLE,
			pkColumnName = IdGenerator.GEN_NAME,
			pkColumnValue = IdGenerator.TM_M_GIFT_RECORD_ID,
			valueColumnName = IdGenerator.GEN_VALUE,
			initialValue = 1,
			allocationSize = 1
	)
	private long id;
	
	/**
	 * 赠送者用户ID
	 */
	@Column(name = "from_user_id")
	private long fromUserId;
	
	/**
	 * 收取者用户ID
	 */
	@Column(name = "to_user_id")
	private long toUserId;
	
	/**
	 * 赠送时间
	 */
	private Date recordDate;
	
	/**
	 * 礼品ID
	 */
	@Column(name = "gift_id")
	private long giftId;
	
	/**
	 * 赠送时间
	 */
	private String giftName;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getFromUserId() {
		return fromUserId;
	}

	public void setFromUserId(long fromUserId) {
		this.fromUserId = fromUserId;
	}

	public long getToUserId() {
		return toUserId;
	}

	public void setToUserId(long toUserId) {
		this.toUserId = toUserId;
	}

	public Date getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}

	public long getGiftId() {
		return giftId;
	}

	public void setGiftId(long giftId) {
		this.giftId = giftId;
	}

	public String getGiftName() {
		return giftName;
	}

	public void setGiftName(String giftName) {
		this.giftName = giftName;
	}
}
